<template>
  <div class="father">
    <h3>父组件</h3>
    姓名: <input type="text" v-model="username" placeholder="输入姓名"><br>
    密码: <input type="password" v-model="password" placeholder="输入密码"><br>
    <ChildComponent v-model:username="username" v-model:password="password" />
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue';
import ChildComponent from './ChildComponent.vue';

const username = ref('');
const password = ref('');
</script>

<style scoped>
.father {
  background-color: rgb(165, 164, 164);
  padding: 20px;
  border-radius: 10px;
}
</style>
